﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Summer.Log;
using Summer.Core.Aop;
using Summer.Interceptor;
using Summer.IO;

namespace AopDemo
{
    class Program
    {
        private static ILog logger = LogFactory.GetLogger(typeof(Program),false);
        static void Main(string[] args)
        {
            LogDemo();
            logger.Info("this is a logger message ---run end ");
            Console.Read();
        }
        static void LogDemo() 
        {
            LopAOPDemo aop = new LopAOPDemo();
            aop.Add(5, 6);
            aop.GetTime(); 
        }
        [Log(true)]
        [Interceptor]
        public class LopAOPDemo : AbstractAOPbject
        {
            public int Add(int x, int y)
            {
                return x + y;
            }
            public DateTime GetTime()
            {
                return DateTime.Now;
            }
        }
    }
}
